package com.wanghengzhi.kata;

/**
 *
 * @author wanghengzhi
 * @since 2021/11/15 20:00
 */
public class Regular extends Goods {
    public Regular(int quality, int sellIn) {
        super("Regular", quality, sellIn);
    }

    @Override
    public void updateByDay() {
        decreaseByOneIfQualityGreatThanMinValue();
        decreaseSellInByOne();
        if (isExpired()) {
            decreaseByOneIfQualityGreatThanMinValue();
        }
    }
}
